import Vue from 'vue'
import VueRouter from 'vue-router'
import system from '../views/System'
import login from '../views/login/Login'
import OrdersList from '../components/orders/OrdersList.vue'
import SurrenderList from '../components/orders/SurrenderList.vue'
import SaleManOrder from '../components/orders/SaleManOrder.vue'


Vue.use(VueRouter)

const routes = [{
  //     path: '/',
  //     redirect: '/system',
  //   },


  //   {
  //     path: '/system',
  //     name: 'System',
  //     // component: system,
  //     component: System,
  //     children: [{
  //         path: 'getInsuresList',
  //         name: 'GetInsuresList',
  //         component: () => import('../components/getInsuresList/GetInsuresList.vue')
  //       },
  //       {
  //         path: 'addInsuresList',
  //         name: 'AddInsuresList',
  //         component: () => import('../components/addInsuresList/AddInsuresList.vue')
  //       },
  //       {
  //         path: 'modification/:id',
  //         name: 'Modification',
  //         props: true,
  //         component: () => import('../components/modification/Modification.vue')
  //       },
  //       //lyy
  //       {
  //         path: 'CustomerList',
  //         name: 'customerList',
  //         component: () => import('../components/user/CustomerList.vue')
  //       }, {
  //         path: 'MyCustomerList',
  //         name: 'myCustomerList',
  //         component: () => import('../components/user/MyCustomerList.vue')
  //       },
  //       {
  //         path: 'addUser',
  //         name: 'addUser',
  //         component: () => import('../components/user/addUser.vue')
  //       },
  //       {
  //         path: 'modifyUser',
  //         name: 'ModifyUser',
  //         component: () => import('../components/user/ModifyUser.vue')
  //       },
  //       //上面是lyy
  //       {
  //         path: 'Types',
  //         name: 'Types',
  //         component: () => import('../components/types/Types.vue'),
  //       },
  //       {
  //         path: 'salespersonsList',
  //         name: 'SalespersonsList',
  //         props: true,
  //         component: () => import('../components/salespersons/salespersonsList.vue')
  //       },
  //       {
  //         path: 'salespersonsAdd',
  //         name: 'SalespersonsAdd',
  //         props: true,
  //         component: () => import('../components/salespersons/salespersonsAdd.vue')
  //       },
  //       {
  //         path: 'salespersonsChange/:_id',
  //         name: 'SalespersonsChange',
  //         props: true,
  //         component: () => import('../components/salespersons/salespersonsChange.vue')
  //       },
  //       //  zengweikag
  //       {
  //         path: 'adminsList',
  //         name: 'AdminsList',
  //         props: true,
  //         component: () => import('../components/admins/adminsList')
  //       },
  //       {
  //         path: 'adminsAdd',
  //         name: 'AdminsAdd',
  //         props: true,
  //         component: () => import('../components/admins/adminsAdd.vue')
  //       },
  //       {
  //         path: 'adminsChange/:_id',
  //         name: 'AdminsChange',
  //         props: true,
  //         component: () => import('../components/admins/adminsChange.vue')
  //       },
  //     ]
  //   },
  //    //郑伟  用户登录路由
  // {
  //   path :'/login',
  //   name:'login',
  //   component:login,
  // }
  // ]

  path: '/',
  redirect: '/system',
},
{
  path: '/system',
  name: 'System',
  component: system,
  children: [
    {
      path: 'getInsuresList',
      name: 'GetInsuresList',
      component: () => import('../components/getInsuresList/GetInsuresList.vue')
    },
    {
      path: 'addInsuresList',
      name: 'AddInsuresList',
      component: () => import('../components/addInsuresList/AddInsuresList.vue')
    },
    {
      path: 'modification/:id',
      name: 'Modification',
      props: true,
      component: () => import('../components/modification/Modification.vue')
    },
    //lyy
    {
      path: 'CustomerList',
      name: 'customerList',
      component: () => import('../components/user/CustomerList.vue')
    }, {
      path: 'MyCustomerList',
      name: 'myCustomerList',
      component: () => import('../components/user/MyCustomerList.vue')
    },
    {
      path: 'addUser',
      name: 'addUser',
      component: () => import('../components/user/addUser.vue')
    },
    {
      path: 'modifyUser',
      name: 'ModifyUser',
      component: () => import('../components/user/ModifyUser.vue')
    },
    //上面是lyy
    {
      path: 'Types',
      name: 'Types',
      component: () => import('../components/types/Types.vue'),
    },
    {
      path: 'salespersonsList',
      name: 'SalespersonsList',
      props: true,
      component: () => import('../components/salespersons/salespersonsList.vue')
    },
    {
      path: 'salespersonsAdd',
      name: 'SalespersonsAdd',
      props: true,
      component: () => import('../components/salespersons/salespersonsAdd.vue')
    },
    {
      path: 'salespersonsChange/:_id',
      name: 'SalespersonsChange',
      props: true,
      component: () => import('../components/salespersons/salespersonsChange.vue')
    },
    {
      path: 'adminsList',
      name: 'AdminsList',
      props: true,
      component: () => import('../components/admins/adminsList')
    },
    {
      path: 'adminsAdd',
      name: 'AdminsAdd',
      props: true,
      component: () => import('../components/admins/adminsAdd.vue')
    },
    {
      path: 'adminsChange/:_id',
      name: 'AdminsChange',
      props: true,
      component: () => import('../components/admins/adminsChange.vue')
    },
     {
      path: 'adminsCheck',
      name: 'AdminsCheck',
      props: true,
      component: () => import('../components/admins/adminsCheck.vue')
    },
    {
      //理赔列表
      path: 'myClaimsList',
      name: 'MyClaimsList',
      component: () => import('../components/claims/MyClaimsList.vue'),
    },
    {
      //新增理赔
      path: 'submitClaimMsg',
      name: 'SubmitClaimMsg',
      component: () => import('../components/claims/SubmitClaimMsg.vue'),
    },
    {
      path: 'SurrenderList',
      name: 'SurrenderList',
      component: SurrenderList
    },
    {
      path: 'OrdersList',
      name: 'OrdersList',
      component: OrdersList
    },
    {
      path: 'SaleManOrder',
      name: 'SaleManOrder',
      component: SaleManOrder
    },
  ]
},
//郑伟  用户登录路由
{
  path: '/login',
  name: 'login',
  component: login,
}]
const router = new VueRouter({
  routes
})

export default router